Order of audio and video streams when converting

For questions and discussion that is NOT (I repeat NOT) specific to a certain Operating System.
jalcaid001
Blank Cone
Blank Cone
Posts: 18
Joined: 21 Nov 2020 19:04

Order of audio and video streams when converting

Postby jalcaid001 » 21 Nov 2020 19:09

I have one .mp4 file with 1) video stream 2) audio stream (in that order, according to VLC codec information Ctrl+J)
After converting, the order of streams is switched: 1) audio stream 2) video stream

IS there a way to force the same order? Any problems I could run into. For starters, it seems Microsoft Explorer icons are shown differently (when audio comes first, they don't display in the right orientation)

User avatar
InTheWings
Developer
Developer
Posts: 1275
Joined: 07 Aug 2013 13:15
VLC version: crashing
Operating System: Linux
Contact:

Re: Order of audio and video streams when converting

Postby InTheWings » 21 Nov 2020 23:50

It all depends on the timing of the tracks
:!: If you want your problem to be solved :
* First read troubleshooting guide VSG:Main
* Always provide verbose LOGS ! (command line or from gui)
* Always check your issue against a developer build from Nightly Build of VLC
* Tell us when your problem is solved !

jalcaid001
Blank Cone
Blank Cone
Posts: 18
Joined: 21 Nov 2020 19:04

Re: Order of audio and video streams when converting

Postby jalcaid001 » 22 Nov 2020 20:55

Sorry.. depends what?
The order in which they show when I do Ctl+J. If I do the conversion with HandBrake, I keep seeing first the video track
Or are you talking about how Windows displays the icons?

mederi
Big Cone-huna
Big Cone-huna
Posts: 1951
Joined: 15 Mar 2011 16:38
VLC version: 2.0.8
Operating System: Windows Vista/XP

Re: Order of audio and video streams when converting

Postby mederi » 25 Nov 2020 15:31

Audio track (0) + video track (1) is pretty unusual order of tracks in a file. Perhaps it is possible to control the order of tracks in VLC muxer:
Change the id of an elementary stream (setid)
Set ES id:
--sout-setid-id=<integer> Elementary Stream ID
Specify an identifier integer for this elementary stream
--sout-setid-new-id=<integer>
New ES ID
Specify an new identifier integer for this elementary stream
?

jalcaid001
Blank Cone
Blank Cone
Posts: 18
Joined: 21 Nov 2020 19:04

Re: Order of audio and video streams when converting

Postby jalcaid001 » 30 Nov 2020 00:27

I'm just using the convert option of the VLC windows app?

Are you saying there is a way of doing it perhaps form a command line? I was not even aware VLC had a command line. Can you explain me how would I do that?

mederi
Big Cone-huna
Big Cone-huna
Posts: 1951
Joined: 15 Mar 2011 16:38
VLC version: 2.0.8
Operating System: Windows Vista/XP

Re: Order of audio and video streams when converting

Postby mederi » 03 Dec 2020 15:09

I have just found those CLI options in vlc-help file. Perhaps it is possible to use them to control the id of particular streams in output when converting a file.

jalcaid001
Blank Cone
Blank Cone
Posts: 18
Joined: 21 Nov 2020 19:04

Re: Order of audio and video streams when converting

Postby jalcaid001 » 15 Dec 2020 13:16

How do you use them within the graphic program?

mederi
Big Cone-huna
Big Cone-huna
Posts: 1951
Joined: 15 Mar 2011 16:38
VLC version: 2.0.8
Operating System: Windows Vista/XP

Re: Order of audio and video streams when converting

Postby mederi » 15 Dec 2020 18:34

"[v] Show more options" in Open Media dialog (Media > Convert/Save... or Stream... > [v] Show more options > Edit Options). You can edit stream output string in the final step in streaming wizard (Media > Stream...).

jalcaid001
Blank Cone
Blank Cone
Posts: 18
Joined: 21 Nov 2020 19:04

Re: Order of audio and video streams when converting

Postby jalcaid001 » 05 Jul 2021 15:14

Sorry for the delay.. I finally got around to give it some tries

I add in this field ' :file-caching=300 :sout-setid-id=1 :sout-setid-new-id=0' and some variations

Still, audio stream is still the first one

Am I doing it wrong? Any ideas?

mederi
Big Cone-huna
Big Cone-huna
Posts: 1951
Joined: 15 Mar 2011 16:38
VLC version: 2.0.8
Operating System: Windows Vista/XP

Re: Order of audio and video streams when converting

Postby mederi » 05 Jul 2021 18:24

I was also curious so I also tried some combinations and I really could not make video to stay the first stream in a file. I could change the order of additional tracks in a file with multiple audio tracks. Then I observed that the video file was cut according to the shortest audio track (1 audio track several minutes shorter than the other one in the same file). I do not know whether there is a different/better situation in VLC 4.

jalcaid001
Blank Cone
Blank Cone
Posts: 18
Joined: 21 Nov 2020 19:04

Re: Order of audio and video streams when converting

Postby jalcaid001 » 06 Jul 2021 01:06

Both of those issues seem like bugs, no?
Didn't know 4.0 was there. I tried 3.0.16 and still seeing the same problems.

mederi
Big Cone-huna
Big Cone-huna
Posts: 1951
Joined: 15 Mar 2011 16:38
VLC version: 2.0.8
Operating System: Windows Vista/XP

Re: Order of audio and video streams when converting

Postby mederi » 06 Jul 2021 13:33

VLC 4 nightly builds http://nightlies.videolan.org/

jalcaid001
Blank Cone
Blank Cone
Posts: 18
Joined: 21 Nov 2020 19:04

Re: Order of audio and video streams when converting

Postby jalcaid001 » 08 Jul 2021 17:52

I tried 20210708-0426 and didn't allow me to open the input file

jack.mauro
New Cone
New Cone
Posts: 6
Joined: 08 Feb 2014 20:47

Re: Order of audio and video streams when converting

Postby jack.mauro » 16 May 2022 18:42

The problem is still present in Vlc 3.0.17.4.

Still no way to fix it in stable releases?


Return to “General VLC media player Troubleshooting”

Who is online

Users browsing this forum: No registered users and 49 guests