This is a static archive of our old Q&A Site. Please post any new questions and answers at ask.wireshark.org.

Edit MP3 file by selecting range of packets

0

I've captured streaming audio into a trace file, and I can isolate the conversation and save it as an MP3 with no problem and it works great!

Once I've saved the MP3 file, I listen to it with Audacity and make a note of some time blocks I'd like to remove. What I'd like to do is be able to surgically select a range of packets (which, in this case, are the commercials) and delete them from the trace file and then re-save all of the packets as a new MP3 file (minus the commercials or any other junk I don't want as part of my final MP3 file).

Surely there's a way to select a range (ideally, multiple ranges) of packets and delete then from your trace file, isn't there?

Thank you, Ed

asked 29 Jun '13, 16:22

Ed_Flecko's gravatar image

Ed_Flecko
1111
accept rate: 0%

edited 30 Jun '13, 17:23

Guy%20Harris's gravatar image

Guy Harris ♦♦
17.4k335196


One Answer:

1

Yes, you could do that by applying filters like "frame.number < x or frame.number > y", with x being the beginning of the frames you want to remove and y being the end. With that filter you'll keep the other packets visible, which you can then export using "File" -> "Export Specified Packets" -> "All Packets - Displayed". Then reload the new file.

BUT - it makes no sense. Removing the packets will result in a damaged MP3 file because parts are missing from it that aren't surgically removed from a MP3 file format point of view.

AND - why don't you use Audacity instead - it is a audio editor with which you can easily remove the parts you don't like. Doing it to the trace makes absolutely no sense in my opinion. It's like using a chainsaw on a cow when all you want to do is cut a single steak from a larger piece of filet.

answered 29 Jun '13, 18:40

Jasper's gravatar image

Jasper ♦♦
23.8k551284
accept rate: 18%

edited 29 Jun '13, 18:41

Jasper, The main reason why I don't use Audacity to do the editing is because what starts as an approximately 15Mb file from Wireshark becomes a 75Mb as soon as you wash it through Audacity!

And you may be right - editing it with Wireshark may result in an unusable MP3 file but that's exactly what I want to find out - CAN it be successfully "edited" with Wireshark and keep the dramatically smaller file size?...or do I simply HAVE to use an audio editing program?

Ed

(29 Jun '13, 19:36) Ed_Flecko

I'd say you have to use an audio editing program. And the size is getting bigger if you write the file as uncompressed WAVE or when using MP3 compression that isn't as high as the original. You should try to find out what bit rate the file was compressed with originally and write the cleaned file with the same ratio. Or try a cutting program that doesn't recode, like this one: http://mpesch3.de1.cc/mp3dc.html

(29 Jun '13, 19:40) Jasper ♦♦